<?php
declare (strict_types = 1);

namespace app\common\model;

class UserRole extends Base
{

    protected $name = 'user_role';

    public function getTypeTextAttr($value,$data)
    {
        return Level::where('id',$data['type'])->value('title');
    }
    public static function getType(): array
    {
        return [2 => '家庭健康管理师', 3 => '专家团队', 4 => '服务团队'];
    }

    public static function getTypeList(): array
    {
        return [
            [
                'value' => 2,
                'title' => '家庭健康管理师'
            ],
            [
                'value' => 3,
                'title' => '专家团队'
            ],
            [
                'value' => 4,
                'title' => '服务团队'
            ]
        ];
    }
}
